var sessionApp = angular.module("sessionModule",[]);
sessionApp.controller('navCtrl',function ($scope,$http) {
    var req = {
        method:"GET",
        url:"/CHa/session"
    }

    $http(req)
        .then(function (res) {
            $scope.userAccount = res.data.account;
            $scope.hasLogin = true;
        });

    $scope.logOut = function () {
        $scope.hasLogin = false;

        var clearSession = {
        }
        window.location.href = "home.html";
    }
});


